#ifndef __THREAD__H__
#define __THREAD__H__

#include <pthread.h>
#include <stdbool.h>

#define createThreadHandle(func) \
    void* func(void *data)

typedef void *(*ThreadHandle)(void*);

typedef struct Thread Thread;
struct Thread {
    pthread_t thread;
    ThreadHandle handle;
    void *data;

    bool started;
    bool stoped;
    bool running;
};

bool createThread(Thread *thread, ThreadHandle handle, void *data);
bool runThread(Thread *thread);

// None Standard Function
bool stopThread(Thread *thread);

#endif  //!__THREAD__H__